<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>[%$softtitle%]</title>
<link href="templates/css/baselist.css" rel="stylesheet" type="text/css" />
<link href="templates/css/all.css" rel="stylesheet" type="text/css" />
<link href="templates/css/clickmenu.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/control.js"></script>
<script type="text/javascript" src="js/form.js"></script>
<script type="text/javascript">

	var resizewindow= null;

	window.onresize = function(){
		var h = $(window).height();
		if(resizewindow!=h){
			sizewindow();
			resizewindow=h;
		}
	}

	function sizewindow(){
		var h = $(window).height();
		if(document.getElementById("mainbodyauto")){
			$('.manageadd').css({height:h-40});
			$('.manageedit').css({height:h-40});
		}
	}
	var setting_js_save_ok = "[%$ST.setting_js_save_ok%]";
	var setting_js_save_no = "[%$ST.setting_js_save_no%]";
	var iframename = "[%$iframename%]";
	$(document).ready(function(){
		var h = '[%$iframeheightwindow%]';
		$('.manageadd').css({height:h-40});
		var options = {
			dataType: 'json',
			beforeSubmit: formverify,
			success:saveResponse
		}
		$('#setting[%$groupid%]').submit(function() {
			$(this).ajaxSubmit(options);
			return false;
		});
	})




	function formverify(formData) {
		parent.windowsdig('Loading','iframe:index.php?archive=management&action=load','400px','180px','iframe',false);
	}
	function saveResponse(options){
		parent.closeifram();
		var tab=document.getElementById("settingtab"+options.groupid).value;
		if (options.post=='true'){
			alert(setting_js_save_ok);
		}else{
			alert(setting_js_save_no);
		}
		if (tab=='true'){
			parent.onaletdoc()
		}
		
	}
	var siteurl = "[%$url%]";
</script>
</head>

<body>
<form name="setting[%$groupid%]" id="setting[%$groupid%]" method="post" action="index.php?archive=management&action=setsave">
	<input type="hidden" name="groupid" value="[%$groupid%]">
	<input type="hidden" name="tab" id="settingtab[%$groupid%]" value="[%$tab%]">
	<div id="mainbodyauto" class="manageadd">
		<div class="maindobycontent">
			<!--查看已选择的类型-->
			<div class="suggestion">
				<span class="sugicon"><span class="strong colorgorning2">[%$ST.position_title%]</span><span class="colorgorningage">[%$ST.setting_edit_mess%]</span></span>
			</div>
			<div class="sugtitle">
				<span class="sugtitleicon"><span class="strong colorgorning2">[%$ST.setting_edit_input_mess%]</span></span>
			</div>
			<div class="sugtitle-line"></div>
			<div class="formdiv">
				<table border="0" width="100%">
					[%forlist from=$array key=i%]
					<tr class="trstyle2">
						<td width="18%" class="trtitle01">[%$array[i].content%]</td>
						<td width="82%" class="trtitle02">
							[%if $array[i].valtype=='string'%]
							<input type="text" name="[%$array[i].valname%]" size="50" maxlength="250" value="[%$array[i].value%]" class="infoInput"/>
							[%/if%]
                            [%if $array[i].valtype=='longstring'%]
							<input type="text" name="[%$array[i].valname%]" size="120" maxlength="255" value="[%$array[i].value%]" class="infoInput"/>
							[%/if%]
							[%if $array[i].valtype=='font'%]
							<input type="text" name="[%$array[i].valname%]" size="10" maxlength="250" value="[%$array[i].value%]" class="infoInput"/>
							[%/if%]
							[%if $array[i].valtype=='int'%]
							<input type="text" name="[%$array[i].valname%]" size="5" maxlength="20" value="[%$array[i].value%]" class="infoInput"/>
							[%/if%]
							[%if $array[i].valtype=='bool'%]
							<input type="radio" value="1" name="[%$array[i].valname%]"[%if $array[i].value==1%] checked="checked"[%/if%]/> [%$array[i].b1%]&nbsp;
							       <input type="radio" value="0" name="[%$array[i].valname%]"[%if $array[i].value==0%] checked="checked"[%/if%]/> [%$array[i].b2%]
							[%/if%]
							       <!--[%$array[i].valname%]-->
                            [%if $array[i].valname!='sms_custom'%]
                                [%if empty( $array[i].str )!=fase%]
                                       <span class="cautiontitle">[%$array[i].str%]</span>
                                [%/if%]
                            [%/if%]
						</td>
					</tr>
                    [%if $array[i].valtype=='longstring' && $array[i].valname=='sms_custom'%]
                    <tr class="trstyle2">
						<td width="18%" class="trtitle01"></td>
						<td width="82%" class="trtitle02"><span class="cautiontitle" style="background-image:none; padding-left:0; line-height:20px;">[%$array[i].str%]</span></td>
					</tr>
                    [%/if%]
					[%/forlist%]
                    [%if $groupid==2%]
                    <tr class="trstyle2">
						<td width="18%" class="trtitle01">统计代码</td>
						<td width="82%" class="trtitle02"><textarea name="tongji" cols="70" rows="5" class="infoInput">[%$tongji%]</textarea><span class="cautiontitle">把你的统计代码放到这里比如,cnzz,百度统计等</span></td>
                     </tr>
                     [%/if%]
					<tr>
						<td colspan="2"></td>
					</tr>
				</table>
			</div>
		</div>
	</div>
	<div id="downbotton">
		<div id="subbotton">
			<table border="0" width="100%">
				<tr>
					<td id="right"><input type="submit" name="Submit" value="[%$ST.botton_edit%]" class="buttonface" /></td>
					<td id="left" class="padding-left5"><input type="button" name="cancel" onClick="javascript:parent.onaletdoc();" value="[%$ST.botton_edit_reset%]" class="buttonface" /></td>
				</tr>
			</table>
		</div>
	</div>
</form>
</body>

</html>